#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<string.h>

int main()
{
    char word_arr[5100] = { 0 };
    gets(word_arr);
    int len_all = strlen(word_arr);
    int i = 0;
    for (i = 0; i < len_all; i++)
    {
        if (0 == i || ' ' == word_arr[i - 1])
        {
            if (word_arr[i] >= 97 && word_arr[i] <= 122)
            {
                printf("%c", word_arr[i] - 32);
            }
            else
            {
                printf("%c", word_arr[i]);
            }
        }
    }
    return 0;
}